package com.wangwen.wechatmp.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author wangwei
 * @description 用户积分明细表
 * @date 2019/10/9
 */
@Getter
@Setter
@Entity
@Table(name = "user_integral")
@ApiModel(description="用户积分明细表")
public class UserIntegral implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 用户id
     */
    @Column(name = "user_Id")
    @ApiModelProperty(value="用户id")

    private Long userId;
    /**
     * 酒店id    唯一
     */
    @Column(name = "hotel_id")
    @ApiModelProperty(value="酒店id 菜单配置好的")

    private Integer hotelId;

    /**
     * 用户openId
     */
    @Column(name = "open_id")
    @ApiModelProperty(value="用户openId")

    private String openId;

    /**
     * 用户手机号  因为需要积分通用，区分用户的唯一性
     */
    @Column(name = "phone")
    @ApiModelProperty(value="用户手机号")

    private String phone;
    /**
     * 积分变动数量
     */
    @Column(name = "change_score")
    @ApiModelProperty(value="积分变动数量")
    private Integer changeScore;

    /**
     * 积分变动类型  0->订房奖励；1->订房抵扣
     */
    @Column(name = "changes_type")
    @ApiModelProperty(value="积分变动类型  0->订房奖励；1->订房抵扣")
    private Integer changeType;
    /**
     * 总积分
     *
     */
//    @Column(name = "sum_score")
//    private Integer sumScore;


    /**
     * 剩余积分
     *
     */
//    @Column(name = "remain_score")
//    private Integer remainScore;

    /**
     * 积分描述
     *
     */
    @Column(name = "remark")
    @ApiModelProperty(value="remark")
    private String remark;

    /**
     * 创建人
     */
    @Column(name = "create_user")
    private Long createUser;

    /**
     * 创建人姓名
     */
    @Column(name = "user_name")
    private Integer userName;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private String createTime;
}
